package com.goodfox.web.generic.provide.service;

import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import org.springframework.ui.ModelMap;

public interface EntityService {

	/**
	 * 填充实体
	 * @param map 页面传过来的参数
	 * @param c 需要填充实体的类
	 * @return
	 * @throws Exception
	 */
	Object fillEntity(Map map,Class c) throws Exception;
	
	/**
	 * 填充实体
	 * @param request 请求
	 * @param c 需要填充实体的类
	 * @return
	 * @throws Exception
	 */
	Object fillEntity(HttpServletRequest request,Class c) throws Exception;
	
	/**
	 * 填充查询页面Map
	 * @param request 请求
	 * @return
	 * @throws Exception
	 */
	Map fillQueryMap(HttpServletRequest request,ModelMap model);
	
	/**
	 * 填充页面Map
	 * @param request 请求
	 * @return
	 * @throws Exception
	 */
	Map fillPageMap(HttpServletRequest request,ModelMap model);
}
